//
/***********************************************************
             File name:      main.c
             Author:         Bitat (陆叁柒)
             Email :         Bitat@qq.com
             Gitee :         https://gitee.com/bitat
             CSDN  :         https://blog.csdn.net/bitat
             History:        2023/1/12
 ************************************************************/

//判断520-1314之间的闰年
#include <stdio.h>

int leap_year(int year)
{
    if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0))
    {
        return 1;
    }
    else
    {
        return 0;
    }
}

int main() {
    int year = 0;
    int count = 0;

    for (year = 520; year < 1314; year++)
    {
        if(leap_year(year) == 1)
        {
            printf("%d ", year);
            count++;
        }
    }

    printf("\ncount=%d\n", count);
    
    return 0;
}
